#include "cclass.h"

namespace Diablo3{
    const char* DEFAULTCLASSNAMES[] = {
        QT_TR_NOOP("Barbarian"),
        QT_TR_NOOP("Wizard"),
        QT_TR_NOOP("Monk"),
        QT_TR_NOOP("Witch Doctor"),
        QT_TR_NOOP("Demon Hunter")
    };
    const int MAXCLASSES = 5;
}

CClass::CClass(const char * s){
    className = QString(QT_TR_NOOP(s));
}

CClass::CClass(const QString& str)
{
    className = QString(str);
}

CClass::CClass(const CClass &o){
    className = QString(o.className);
}

bool CClass::isValidClass(QString str)
{
    for(int i=0;i<Diablo3::MAXCLASSES;i++)
        if(str == QApplication::translate("Diablo3",Diablo3::DEFAULTCLASSNAMES[i]))
            return true;
    return false;
}
